Optimal. Leaf size=53 \[ \frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}} \]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {844, 217, 206, 266, 63, 208} \begin {gather*} \frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 206
Rule 208
Rule 217
Rule 266
Rule 844
Rubi steps
\begin {align*} \int \frac {A+B x}{x \sqrt {a+b x^2}} \, dx &=A \int \frac {1}{x \sqrt {a+b x^2}} \, dx+B \int \frac {1}{\sqrt {a+b x^2}} \, dx\\ &=\frac {1}{2} A \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,x^2\right )+B \operatorname {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )\\ &=\frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}+\frac {A \operatorname {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x^2}\right )}{b}\\ &=\frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 53, normalized size = 1.00 \begin {gather*} \frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.20, size = 70, normalized size = 1.32 \begin {gather*} \frac {2 A \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}-\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {B \log \left (\sqrt {a+b x^2}-\sqrt {b} x\right )}{\sqrt {b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.29, size = 273, normalized size = 5.15 \begin {gather*} \left [\frac {B a \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) + A \sqrt {a} b \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right )}{2 \, a b}, -\frac {2 \, B a \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - A \sqrt {a} b \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right )}{2 \, a b}, \frac {2 \, A \sqrt {-a} b \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right ) + B a \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right )}{2 \, a b}, -\frac {B a \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - A \sqrt {-a} b \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right )}{a b}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.50, size = 58, normalized size = 1.09 \begin {gather*} \frac {2 \, A \arctan \left (-\frac {\sqrt {b} x - \sqrt {b x^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} - \frac {B \log \left ({\left | -\sqrt {b} x + \sqrt {b x^{2} + a} \right |}\right )}{\sqrt {b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 52, normalized size = 0.98 \begin {gather*} -\frac {A \ln \left (\frac {2 a +2 \sqrt {b \,x^{2}+a}\, \sqrt {a}}{x}\right )}{\sqrt {a}}+\frac {B \ln \left (\sqrt {b}\, x +\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.38, size = 33, normalized size = 0.62 \begin {gather*} \frac {B \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {b}} - \frac {A \operatorname {arsinh}\left (\frac {a}{\sqrt {a b} {\left | x \right |}}\right )}{\sqrt {a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.30, size = 42, normalized size = 0.79 \begin {gather*} \frac {B\,\ln \left (\sqrt {b}\,x+\sqrt {b\,x^2+a}\right )}{\sqrt {b}}-\frac {A\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 5.14, size = 99, normalized size = 1.87 \begin {gather*} - \frac {A \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )}}{\sqrt {a}} + B \left (\begin {cases} \frac {\sqrt {- \frac {a}{b}} \operatorname {asin}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b < 0 \\\frac {\sqrt {\frac {a}{b}} \operatorname {asinh}{\left (x \sqrt {\frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b > 0 \\\frac {\sqrt {- \frac {a}{b}} \operatorname {acosh}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {- a}} & \text {for}\: b > 0 \wedge a < 0 \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________